#include "time.h"

/*------------------------------------------------------------------------------
	Constructor
------------------------------------------------------------------------------*/
Time::Time(){
	m_uiInitTime=SDL_GetTicks();
}

/*------------------------------------------------------------------------------
 *	Destructor
------------------------------------------------------------------------------*/
Time::~Time(){}

/*------------------------------------------------------------------------------
 * 	Resets the time
------------------------------------------------------------------------------*/
void Time::reset(){
	m_uiInitTime=SDL_GetTicks();
}

/*------------------------------------------------------------------------------
 * 	Returns the time passed since last reset
------------------------------------------------------------------------------*/
unsigned int Time::currentTime(){
	unsigned int uiFinMilisegundos=SDL_GetTicks();
	return (uiFinMilisegundos-m_uiInitTime);
}
